Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

A__ZPRIMES -> A__NATS1(s1(s1(0)))
MARK1(filter3(X1, X2, X3)) -> MARK1(X1)
MARK1(filter3(X1, X2, X3)) -> MARK1(X3)
MARK1(filter3(X1, X2, X3)) -> MARK1(X2)
A__NATS1(N) -> MARK1(N)
MARK1(nats1(X)) -> A__NATS1(mark1(X))
MARK1(filter3(X1, X2, X3)) -> A__FILTER3(mark1(X1), mark1(X2), mark1(X3))
MARK1(s1(X)) -> MARK1(X)
A__ZPRIMES -> A__SIEVE1(a__nats1(s1(s1(0))))
MARK1(sieve1(X)) -> A__SIEVE1(mark1(X))
MARK1(nats1(X)) -> MARK1(X)
MARK1(zprimes) -> A__ZPRIMES
A__SIEVE1(cons2(s1(N), Y)) -> MARK1(N)
A__FILTER3(cons2(X, Y), s1(N), M) -> MARK1(X)
MARK1(cons2(X1, X2)) -> MARK1(X1)
MARK1(sieve1(X)) -> MARK1(X)

The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

A__ZPRIMES -> A__NATS1(s1(s1(0)))
MARK1(filter3(X1, X2, X3)) -> MARK1(X1)
MARK1(filter3(X1, X2, X3)) -> MARK1(X3)
MARK1(filter3(X1, X2, X3)) -> MARK1(X2)
A__NATS1(N) -> MARK1(N)
MARK1(nats1(X)) -> A__NATS1(mark1(X))
MARK1(filter3(X1, X2, X3)) -> A__FILTER3(mark1(X1), mark1(X2), mark1(X3))
MARK1(s1(X)) -> MARK1(X)
A__ZPRIMES -> A__SIEVE1(a__nats1(s1(s1(0))))
MARK1(sieve1(X)) -> A__SIEVE1(mark1(X))
MARK1(nats1(X)) -> MARK1(X)
MARK1(zprimes) -> A__ZPRIMES
A__SIEVE1(cons2(s1(N), Y)) -> MARK1(N)
A__FILTER3(cons2(X, Y), s1(N), M) -> MARK1(X)
MARK1(cons2(X1, X2)) -> MARK1(X1)
MARK1(sieve1(X)) -> MARK1(X)

The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


A__ZPRIMES -> A__NATS1(s1(s1(0)))
MARK1(filter3(X1, X2, X3)) -> MARK1(X1)
MARK1(filter3(X1, X2, X3)) -> MARK1(X3)
MARK1(filter3(X1, X2, X3)) -> MARK1(X2)
MARK1(nats1(X)) -> A__NATS1(mark1(X))
MARK1(filter3(X1, X2, X3)) -> A__FILTER3(mark1(X1), mark1(X2), mark1(X3))
MARK1(nats1(X)) -> MARK1(X)
A__SIEVE1(cons2(s1(N), Y)) -> MARK1(N)
A__FILTER3(cons2(X, Y), s1(N), M) -> MARK1(X)
MARK1(cons2(X1, X2)) -> MARK1(X1)
The remaining pairs can at least be oriented weakly.

A__NATS1(N) -> MARK1(N)
MARK1(s1(X)) -> MARK1(X)
A__ZPRIMES -> A__SIEVE1(a__nats1(s1(s1(0))))
MARK1(sieve1(X)) -> A__SIEVE1(mark1(X))
MARK1(zprimes) -> A__ZPRIMES
MARK1(sieve1(X)) -> MARK1(X)
Used ordering: Polynomial interpretation [21]:

POL(0) = 0   
POL(A__FILTER3(x1, x2, x3)) = x1   
POL(A__NATS1(x1)) = x1   
POL(A__SIEVE1(x1)) = x1   
POL(A__ZPRIMES) = 1   
POL(MARK1(x1)) = x1   
POL(a__filter3(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(a__nats1(x1)) = 1 + x1   
POL(a__sieve1(x1)) = x1   
POL(a__zprimes) = 1   
POL(cons2(x1, x2)) = 1 + x1   
POL(filter3(x1, x2, x3)) = 1 + x1 + x2 + x3   
POL(mark1(x1)) = x1   
POL(nats1(x1)) = 1 + x1   
POL(s1(x1)) = x1   
POL(sieve1(x1)) = x1   
POL(zprimes) = 1   

The following usable rules [14] were oriented:

a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
mark1(0) -> 0
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(s1(X)) -> s1(mark1(X))
a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__zprimes -> zprimes
mark1(zprimes) -> a__zprimes
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ QDPOrderProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK1(s1(X)) -> MARK1(X)
A__ZPRIMES -> A__SIEVE1(a__nats1(s1(s1(0))))
MARK1(sieve1(X)) -> A__SIEVE1(mark1(X))
MARK1(zprimes) -> A__ZPRIMES
A__NATS1(N) -> MARK1(N)
MARK1(sieve1(X)) -> MARK1(X)

The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ QDPOrderProof
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK1(s1(X)) -> MARK1(X)
MARK1(sieve1(X)) -> MARK1(X)

The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK1(s1(X)) -> MARK1(X)
MARK1(sieve1(X)) -> MARK1(X)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [21]:

POL(MARK1(x1)) = x1   
POL(s1(x1)) = 1 + x1   
POL(sieve1(x1)) = 1 + x1   

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ QDPOrderProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ QDPOrderProof
QDP
                  ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__filter3(cons2(X, Y), 0, M) -> cons2(0, filter3(Y, M, M))
a__filter3(cons2(X, Y), s1(N), M) -> cons2(mark1(X), filter3(Y, N, M))
a__sieve1(cons2(0, Y)) -> cons2(0, sieve1(Y))
a__sieve1(cons2(s1(N), Y)) -> cons2(s1(mark1(N)), sieve1(filter3(Y, N, N)))
a__nats1(N) -> cons2(mark1(N), nats1(s1(N)))
a__zprimes -> a__sieve1(a__nats1(s1(s1(0))))
mark1(filter3(X1, X2, X3)) -> a__filter3(mark1(X1), mark1(X2), mark1(X3))
mark1(sieve1(X)) -> a__sieve1(mark1(X))
mark1(nats1(X)) -> a__nats1(mark1(X))
mark1(zprimes) -> a__zprimes
mark1(cons2(X1, X2)) -> cons2(mark1(X1), X2)
mark1(0) -> 0
mark1(s1(X)) -> s1(mark1(X))
a__filter3(X1, X2, X3) -> filter3(X1, X2, X3)
a__sieve1(X) -> sieve1(X)
a__nats1(X) -> nats1(X)
a__zprimes -> zprimes

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.